#ifndef _SERVERSOCKET_H_
#define _SERVERSOCKET_H_

#pragma once
#include "Socket.h"
#include "ClientSocket.h"

namespace net
{
enum OptionLevel
{
	TCP
};
enum OptionName
{
	NO_DELAY
};
/*
 * This is an interface to define the basic behaviour of a server socket.
 * Implementation specific code must be placed in classes implementing
 * this interface.
 */
class ServerSocket : public Socket
{
public:
	ServerSocket(void);
	ServerSocket(string portNumber);
	virtual ~ServerSocket(void);
	void setPort(string port);
	string getPort();

	void doBind(void);
	void doListen(void);
	ClientSocket* doAccept(void);
	void setOption(OptionLevel, OptionName);

private:
	string getSocketOptionReadable(int);
	string getSocketLevelReadable(int);
    struct addrinfo hints;
	string port;
};
};

#endif
